.\"
.TH encdb 1 "19 Sep 2008" "ENCDB 1.4"
.SH NAME
encdb \- encrypted database
.SH SYNOPSIS
.BI "encdb -f " dbfile " -p " ask " -N " dbname " 
.br
.BI "encdb -f " dbfile " -p " file:pathname " -N " dbname " 
.br
.sp
.BI "encdb " ... " [ -i  ["filename "] -n " keyname " ]
.br
.sp
.BI "encdb " ... " [ -o  ["filename "] -n " keyname " ]
.br
.sp
.BI "encdb " ... " [ -d -n " keyname " ]
.br
.sp
.BI "encdb " ... " [ -c ]
.br
.sp
.BI "encdb " ... " [ -s ]
.br
.sp
.BI "encdb " ... " [ -l ]
.br
.sp
.BI "encdb " ... " [ "... " ] [ -g ]
.br
.sp
.SH DESCRIPTION
.B Encdb
is useful for the storage of files with sensitive information
by encrypting the contents as it is stored and identified by a key name.
It was born from the need of storing my list of accounts (user/password)
in a secure way.
.PP
.SH "OPTIONS"

.TP
\fB\-f \fI dbfile
Specify the location of the file containing the database(s).
.TP
\fB\-p \fI <ask|file:pathname>
If its called with "-p ask" encdb will prompt for a password. If its
called with "-p file:/path/to/file" encdb will read the password from
the given regular file or named pipe.
.TP
\fB\-N \fI databasename
The database name to access in the specified file. Optional.
.TP
\fB\-c\fR
Creates a database in the specified file.
.TP
\fB\-i \fI filename \fR| \fI\-
Insert data from file \fIfilename\fR to a database
associated with key from option \fB\-n\fR \fIkeyname\fR.
.TP
\fB\-o \fI filename \fR| \fI\-
Retrieves data from database refereed with \fB-n\fR \fIkeyname\fR
and puts it in \fIfilename\fR.
.TP
\fB\-d\fR
Deletes an entry.
.TP
\fB\-l\fR
Prints all entries in a database. The output of each entry name
is fallowd by the name size ( \fIkeyname\fR ) and by it`s content size,
all delimited by a coma, in the same line. At the end of the listing 
a summary of total entries and total sizes are printed.
.sp
.TP
\fB\-s\fR
Prints internal statistics from Bdb. Also its creation date
and last modification date.
.TP
\fB\-g\fR
Print debug information while running.
.sp
.SH EXAMPLES
.sp
.TP
\fBencdb -f \fI\^$HOME\^/.work_ids.edb \fB\-p\fR \fIask\fR \fB\-N\fR \fIsrvroom1\fR \fB\-c\fR
.sp
This will create a database file  in the user`s home directory named \fIwork_ids.edb\fR, with
the password prompted for and the database name \fIsrvroom1\fR.
.sp
.TP
\fBencdb -f \fI\^$HOME\^/.work_ids.edb\fR \fB\-p\fR \fIask\fR \fB\-N\fR \fIsrvroom1\fR  \\
\fB\-i\fR \fI\^$HOME\^/servers/goofy_account \fB\-n\fR \fIgoofy\fR
.sp
Will store the contents of \fI\^$HOME\^/servers/goofy_account\fR into the database \fIsrvroom1\fR with the name \fIgoofy\fR.
.sp
.TP
.SH NOTES
.sp
This program is similar to some utilities from BerkeleyDB-4.x but with a little 
more features and is purpose oriented.
.sp
The algorithm used for encryption is AES-256 from OpenSSL.
if any errors might occur like os crash, power-failure or software error and the
database states useless, the tools that come with the BerkeleyDB-4.x could
be used to recover from tragedy.
.sp
.SH AUTHOR
.TP
Antonio L. De Leon <aldleonm@gmail.com>
